package com.matchmealpha;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class ChangePasswordActivity extends Activity implements OnClickListener {

	private Button leftButton;
	private Button rightButton;

	protected EditText currPasswordText;
	protected EditText newPasswordText;
	protected EditText confirmPasswordText;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		initLayout();
		initListener();
	}

	private void initLayout() {
		setContentView(R.layout.changepassword_view);
		leftButton = (Button) this.findViewById(R.id.ChangePasswordLeftButton);
		rightButton = (Button) this.findViewById(R.id.ChangePasswordRightButton);
		currPasswordText = (EditText) this
				.findViewById(R.id.ChangePasswordCurrentPassword);
		newPasswordText = (EditText) this
				.findViewById(R.id.ChangePasswordNewPassword);
		confirmPasswordText = (EditText) this
				.findViewById(R.id.ChangePasswordConfirmPassword);

	}
	
	private void initListener() {
		leftButton.setOnClickListener(this);
		rightButton.setOnClickListener(this);
		currPasswordText.setOnClickListener(this);
		newPasswordText.setOnClickListener(this);
		confirmPasswordText.setOnClickListener(this);
	}
	
	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case (R.id.ChangePasswordLeftButton):
			TimelineGroup.timelineGroup.back();
			break;
		case (R.id.ChangePasswordRightButton):
			//TODO Save password
			TimelineGroup.timelineGroup.back();
			break;
		}
	}
}
